package com.niodata.dp.core.usermgr.model.result;

import com.fasterxml.jackson.annotation.JsonView;
import com.niodata.dp.core.usermgr.model.UserInfo;
import com.niodata.dp.core.usermgr.view.GroupResourcesView;
import java.util.ArrayList;
import java.util.List;

public class ResourceResult {

  private String path;
  private Boolean internal = Boolean.FALSE;
  private List<UserInfo> authorized = new ArrayList<>();

  @JsonView(value = {GroupResourcesView.class})
  public String getPath() {
    return path;
  }

  public void setPath(String path) {
    this.path = path;
  }

  @JsonView(value = {GroupResourcesView.class})
  public Boolean getInternal() {
    return internal;
  }

  public void setInternal(Boolean internal) {
    this.internal = internal;
  }

  @JsonView(value = {GroupResourcesView.class})
  public List<UserInfo> getAuthorized() {
    return authorized;
  }

  public void setAuthorized(List<UserInfo> authorized) {
    this.authorized = authorized;
  }

  public void addAuthorized(UserInfo userInfo) {
    this.authorized.add(userInfo);
  }

}
